﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="WebSystem.test" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="Systestcomjun/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript">


        function onFileChange(sender) {
            var filename = sender.value;
            if (filename == "") {
                return "";
            }
            var ExName = filename.substr(filename.lastIndexOf(".") + 1).toUpperCase();


            if (ExName == "JPG" || ExName == "BMP" || ExName == "GIF" || ExName == "PNG") {
                var a=window.URL.createObjectURL(sender.files[0]);
                document.getElementById("imgtest").src =a ;
                convertImgToBase64(a, function (base64Img) {
                    //
                    $("#base64").html(base64Img);
                    $.post("/App/Ajax.ashx", {
                        action: "setPhoto",
                        PerID:1,
                        Photo: "/9j/4AAQSkZJRgABAQEAAQABAAD/2wBDAAIBAQEBAQIBAQECAgICAgQDAgICAgUEBAMEBgUGBgYFBgYGBwkIBgcJBwYGCAsICQoKCgoKBggLDAsKDAkKCgr/2wBDAQICAgICAgUDAwUKBwYHCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgr/wAARCACMAHkDAREAAhEBAxEB/8QAHgAAAAcBAQEBAAAAAAAAAAAAAwQFBgcICQIKAQD/xABJEAABAwIFAgQDBAUHCgcBAAABAgMEBREABgcSIQgxEyJBUQkUYRUycZEjQlOBoQoWQ1KSosEkM1RigpPR4fDxFxglRFVjZLH/xAAbAQABBQEBAAAAAAAAAAAAAAAEAQIDBQYAB//EADcRAAEEAQMDAQYEBQQDAQAAAAEAAgMRBBIhMQVBUWETInGBobGRwdHwBhQjMuEVJFLxJUJicv/aAAwDAQACEQMRAD8AtVphRGZMVhSYxUkDuEhO0j/C2IMh5tUjeVK1DywbtPhld191BPAPv9OPTAJFooChSWGMuoblha0KNhwUcjETm0lTgoVJRHdSW2+OQVDte+Era0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J9Ik61Z11Id8U1OjZdixYCt90IRKeUXSQRcmzCADfgFXe+M3/ABU4thiZ2cbPy4+6eB3WoyqhKfpIcLhSXFp3FPHfGXhaNKa47IrAqU1uEl0SFEls3BNx6/8ADFxABSr3nZc/zkrH+lf3B/wxPoahtRX/2Q=="
                    }, function (data) {
                        alert(data);
                    });
                });
            }
            else {
                alert('请选择正确的图片格式！');
                sender.value = null;
                return false;
            }

        }

        function convertImgToBase64(url, callback, outputFormat) {
            var canvas = document.createElement('CANVAS');
            var ctx = canvas.getContext('2d');
            var img = new Image;
            img.crossOrigin = 'Anonymous';
            img.onload = function () {
                canvas.height = img.height;
                canvas.width = img.width;
                ctx.drawImage(img, 0, 0);
                var dataURL = canvas.toDataURL(outputFormat || 'image/png');
                callback.call(this, dataURL);
                // Clean up 
                canvas = null;
            };
            img.src = url;
        }

       function tt() {
            var imageUrl = $(this).find('input[name=url]').val();
            console.log('imageUrl', imageUrl);
            convertImgToBase64(imageUrl, function (base64Img) {
                
            });
       }

       //$.post("/app/ajax.ashx", { action: "setPersonRewardPostMat", PerID: 120, PerRewardID: 69, OrderID: 200, PerRealName: "吴彦祖", SerUserID: 107 }, function (data) {
       //    alert(data);
       //});
       $(function () {
           $("TextBox1").attr("value","1");
           var ic = $(".item_content");
           var divs = ic.find("div");
           var arr = divs.get();
           arr.sort(function (a, b) {
               var ai = parseFloat($(a).attr("t"), 10);
               var bi = parseFloat($(b).attr("t"), 10);
               if (ai > bi) {
                   return 1;
               } else if (ai < bi) {
                   return -1;
               } else {
                   return 0;
               }
           });
           var ic1 = $(".item_content1");
           var divs1 = ic.find("div");
           var arr1 = divs.get();
           ic.append(arr1);
           divs.appendTo(ic1);
       });
    </script>
</head>
<body>
    <form id="form1" runat="server">
       <input type="file" onchange="onFileChange(this)" />
        <img id="imgtest" />
        <div id="base64" style="width:700px;"></div>
        <input type="text" id="asad" value="1"/><asp:TextBox ID="TextBox1" runat="server" Width="640px" TextMode="Password"></asp:TextBox>
        <div class='item_content'>
        <div t="1">4</div>
        <div t="1">2</div>
        <div t="12">3</div>
        <div t="13">4</div>
        <div t="31">5</div>
        <div t="32">6</div>
        <div t="0">7</div>
    </div>
        <div class='item_content1'>
        <div t="1">4</div>
        <div t="1">2</div>
        <div t="12">3</div>
        <div t="13">4</div>
        <div t="31">5</div>
        <div t="32">6</div>
        <div t="0">7</div>
    </div>
        <script type="text/javascript">
            //var date = Date.now()
           // alert(date);
            //$("#asad").val(date);
            //var a = $("#TextBox1").val();
            //alert(a.length);
            //$("#base64").html(a);
            //alert($("#asad").val());
        </script>
    </form>
</body>
</html>
